var _tools = require("../../../utils/tools.js"), _tools2 = _interopRequireDefault(_tools);

function _interopRequireDefault(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}

var that, app = getApp();

Page({
    data: {
        share_text: "",
        share_image: "",
        a: "",
        interstitialAd: ""
    },
    onLoad: function(t) {
        that = this;
        var a = {
            action: "decode",
            contr: "noLogin",
            path: t.url,
            token: wx.getStorageSync("token")
        };
        _tools2.default.request(a, function(t) {
            that.setData(t.info);
        });
    },
    onReady: function() {
        wx.setNavigationBarColor({
            frontColor: "#000000",
            backgroundColor: "#000000"
        }), wx.createInterstitialAd && this.data.screen_ad && "" == this.data.interstitialAd && (that.data.interstitialAd = wx.createInterstitialAd({
            adUnitId: that.data.screen_ad
        }), that.data.interstitialAd.onError(function(t) {
            console.log(t);
        }), that.data.interstitialAd.show().catch(function(t) {
            console.error(t);
        }));
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        return {
            title: this.data.share.text,
            imageUrl: this.data.share.images,
            path: "bh_bargain/pages/index/index?parent_id=" + this.data.share.member_id
        };
    }
});